3.2.78 \(\int \frac {A+B \sin (e+f x)}{\sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))^{3/2}} \, dx\) [178]

Optimal. Leaf size=103 \[ \frac {(A+B) \cos (e+f x)}{2 f \sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))^{3/2}}+\frac {(A-B) \tanh ^{-1}(\sin (e+f x)) \cos (e+f x)}{2 c f \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}} \]

[Out]

1/2*(A+B)*cos(f*x+e)/f/(c-c*sin(f*x+e))^(3/2)/(a+a*sin(f*x+e))^(1/2)+1/2*(A-B)*arctanh(sin(f*x+e))*cos(f*x+e)/
c/f/(a+a*sin(f*x+e))^(1/2)/(c-c*sin(f*x+e))^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.18, antiderivative size = 103, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 40, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.075, Rules used = {3051, 2820, 3855} \begin {gather*} \frac {(A+B) \cos (e+f x)}{2 f \sqrt {a \sin (e+f x)+a} (c-c \sin (e+f x))^{3/2}}+\frac {(A-B) \cos (e+f x) \tanh ^{-1}(\sin (e+f x))}{2 c f \sqrt {a \sin (e+f x)+a} \sqrt {c-c \sin (e+f x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(A + B*Sin[e + f*x])/(Sqrt[a + a*Sin[e + f*x]]*(c - c*Sin[e + f*x])^(3/2)),x]

[Out]

((A + B)*Cos[e + f*x])/(2*f*Sqrt[a + a*Sin[e + f*x]]*(c - c*Sin[e + f*x])^(3/2)) + ((A - B)*ArcTanh[Sin[e + f*
x]]*Cos[e + f*x])/(2*c*f*Sqrt[a + a*Sin[e + f*x]]*Sqrt[c - c*Sin[e + f*x]])

Rule 2820

Int[1/(Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]*Sqrt[(c_) + (d_.)*sin[(e_.) + (f_.)*(x_)]]), x_Symbol] :> Di
st[Cos[e + f*x]/(Sqrt[a + b*Sin[e + f*x]]*Sqrt[c + d*Sin[e + f*x]]), Int[1/Cos[e + f*x], x], x] /; FreeQ[{a, b
, c, d, e, f}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0]

Rule 3051

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*sin[(e_.
) + (f_.)*(x_)])^(n_.), x_Symbol] :> Simp[(A*b - a*B)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x]
)^n/(a*f*(2*m + 1))), x] + Dist[(a*B*(m - n) + A*b*(m + n + 1))/(a*b*(2*m + 1)), Int[(a + b*Sin[e + f*x])^(m +
 1)*(c + d*Sin[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2
 - b^2, 0] && (LtQ[m, -2^(-1)] || (ILtQ[m + n, 0] &&  !SumSimplerQ[n, 1])) && NeQ[2*m + 1, 0]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \frac {A+B \sin (e+f x)}{\sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))^{3/2}} \, dx &=\frac {(A+B) \cos (e+f x)}{2 f \sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))^{3/2}}+\frac {(A-B) \int \frac {1}{\sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}} \, dx}{2 c}\\ &=\frac {(A+B) \cos (e+f x)}{2 f \sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))^{3/2}}+\frac {((A-B) \cos (e+f x)) \int \sec (e+f x) \, dx}{2 c \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}}\\ &=\frac {(A+B) \cos (e+f x)}{2 f \sqrt {a+a \sin (e+f x)} (c-c \sin (e+f x))^{3/2}}+\frac {(A-B) \tanh ^{-1}(\sin (e+f x)) \cos (e+f x)}{2 c f \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.38, size = 191, normalized size = 1.85 \begin {gather*} \frac {\left (A+B+(-A+B) \log \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^2+(A-B) \log \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^2\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )}{2 f \sqrt {a (1+\sin (e+f x))} (c-c \sin (e+f x))^{3/2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(A + B*Sin[e + f*x])/(Sqrt[a + a*Sin[e + f*x]]*(c - c*Sin[e + f*x])^(3/2)),x]

[Out]

((A + B + (-A + B)*Log[Cos[(e + f*x)/2] - Sin[(e + f*x)/2]]*(Cos[(e + f*x)/2] - Sin[(e + f*x)/2])^2 + (A - B)*
Log[Cos[(e + f*x)/2] + Sin[(e + f*x)/2]]*(Cos[(e + f*x)/2] - Sin[(e + f*x)/2])^2)*(Cos[(e + f*x)/2] - Sin[(e +
 f*x)/2])*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2]))/(2*f*Sqrt[a*(1 + Sin[e + f*x])]*(c - c*Sin[e + f*x])^(3/2))

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(307\) vs. \(2(91)=182\).
time = 0.32, size = 308, normalized size = 2.99

method result size
default \(-\frac {\left (A \sin \left (f x +e \right ) \ln \left (-\frac {-1+\cos \left (f x +e \right )-\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )-A \sin \left (f x +e \right ) \ln \left (-\frac {-1+\cos \left (f x +e \right )+\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )-B \sin \left (f x +e \right ) \ln \left (-\frac {-1+\cos \left (f x +e \right )-\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )+B \sin \left (f x +e \right ) \ln \left (-\frac {-1+\cos \left (f x +e \right )+\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )-A \ln \left (-\frac {-1+\cos \left (f x +e \right )-\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )+A \ln \left (-\frac {-1+\cos \left (f x +e \right )+\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )-A \sin \left (f x +e \right )+B \ln \left (-\frac {-1+\cos \left (f x +e \right )-\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )-B \ln \left (-\frac {-1+\cos \left (f x +e \right )+\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )-B \sin \left (f x +e \right )\right ) \cos \left (f x +e \right )}{2 f \sqrt {a \left (1+\sin \left (f x +e \right )\right )}\, \left (-c \left (\sin \left (f x +e \right )-1\right )\right )^{\frac {3}{2}}}\) \(308\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A+B*sin(f*x+e))/(c-c*sin(f*x+e))^(3/2)/(a+a*sin(f*x+e))^(1/2),x,method=_RETURNVERBOSE)

[Out]

-1/2/f*(A*sin(f*x+e)*ln(-(-1+cos(f*x+e)-sin(f*x+e))/sin(f*x+e))-A*sin(f*x+e)*ln(-(-1+cos(f*x+e)+sin(f*x+e))/si
n(f*x+e))-B*sin(f*x+e)*ln(-(-1+cos(f*x+e)-sin(f*x+e))/sin(f*x+e))+B*sin(f*x+e)*ln(-(-1+cos(f*x+e)+sin(f*x+e))/
sin(f*x+e))-A*ln(-(-1+cos(f*x+e)-sin(f*x+e))/sin(f*x+e))+A*ln(-(-1+cos(f*x+e)+sin(f*x+e))/sin(f*x+e))-A*sin(f*
x+e)+B*ln(-(-1+cos(f*x+e)-sin(f*x+e))/sin(f*x+e))-B*ln(-(-1+cos(f*x+e)+sin(f*x+e))/sin(f*x+e))-B*sin(f*x+e))*c
os(f*x+e)/(a*(1+sin(f*x+e)))^(1/2)/(-c*(sin(f*x+e)-1))^(3/2)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sin(f*x+e))/(c-c*sin(f*x+e))^(3/2)/(a+a*sin(f*x+e))^(1/2),x, algorithm="maxima")

[Out]

integrate((B*sin(f*x + e) + A)/(sqrt(a*sin(f*x + e) + a)*(-c*sin(f*x + e) + c)^(3/2)), x)

________________________________________________________________________________________

Fricas [A]
time = 0.44, size = 363, normalized size = 3.52 \begin {gather*} \left [-\frac {{\left ({\left (A - B\right )} \cos \left (f x + e\right ) \sin \left (f x + e\right ) - {\left (A - B\right )} \cos \left (f x + e\right )\right )} \sqrt {a c} \log \left (-\frac {a c \cos \left (f x + e\right )^{3} - 2 \, a c \cos \left (f x + e\right ) + 2 \, \sqrt {a c} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {-c \sin \left (f x + e\right ) + c} \sin \left (f x + e\right )}{\cos \left (f x + e\right )^{3}}\right ) + 2 \, \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {-c \sin \left (f x + e\right ) + c} {\left (A + B\right )}}{4 \, {\left (a c^{2} f \cos \left (f x + e\right ) \sin \left (f x + e\right ) - a c^{2} f \cos \left (f x + e\right )\right )}}, -\frac {{\left ({\left (A - B\right )} \cos \left (f x + e\right ) \sin \left (f x + e\right ) - {\left (A - B\right )} \cos \left (f x + e\right )\right )} \sqrt {-a c} \arctan \left (\frac {\sqrt {-a c} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {-c \sin \left (f x + e\right ) + c}}{a c \cos \left (f x + e\right ) \sin \left (f x + e\right )}\right ) + \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {-c \sin \left (f x + e\right ) + c} {\left (A + B\right )}}{2 \, {\left (a c^{2} f \cos \left (f x + e\right ) \sin \left (f x + e\right ) - a c^{2} f \cos \left (f x + e\right )\right )}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sin(f*x+e))/(c-c*sin(f*x+e))^(3/2)/(a+a*sin(f*x+e))^(1/2),x, algorithm="fricas")

[Out]

[-1/4*(((A - B)*cos(f*x + e)*sin(f*x + e) - (A - B)*cos(f*x + e))*sqrt(a*c)*log(-(a*c*cos(f*x + e)^3 - 2*a*c*c
os(f*x + e) + 2*sqrt(a*c)*sqrt(a*sin(f*x + e) + a)*sqrt(-c*sin(f*x + e) + c)*sin(f*x + e))/cos(f*x + e)^3) + 2
*sqrt(a*sin(f*x + e) + a)*sqrt(-c*sin(f*x + e) + c)*(A + B))/(a*c^2*f*cos(f*x + e)*sin(f*x + e) - a*c^2*f*cos(
f*x + e)), -1/2*(((A - B)*cos(f*x + e)*sin(f*x + e) - (A - B)*cos(f*x + e))*sqrt(-a*c)*arctan(sqrt(-a*c)*sqrt(
a*sin(f*x + e) + a)*sqrt(-c*sin(f*x + e) + c)/(a*c*cos(f*x + e)*sin(f*x + e))) + sqrt(a*sin(f*x + e) + a)*sqrt
(-c*sin(f*x + e) + c)*(A + B))/(a*c^2*f*cos(f*x + e)*sin(f*x + e) - a*c^2*f*cos(f*x + e))]

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {A + B \sin {\left (e + f x \right )}}{\sqrt {a \left (\sin {\left (e + f x \right )} + 1\right )} \left (- c \left (\sin {\left (e + f x \right )} - 1\right )\right )^{\frac {3}{2}}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sin(f*x+e))/(c-c*sin(f*x+e))**(3/2)/(a+a*sin(f*x+e))**(1/2),x)

[Out]

Integral((A + B*sin(e + f*x))/(sqrt(a*(sin(e + f*x) + 1))*(-c*(sin(e + f*x) - 1))**(3/2)), x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 227 vs. \(2 (98) = 196\).
time = 0.53, size = 227, normalized size = 2.20 \begin {gather*} -\frac {\frac {{\left (A \sqrt {a} \sqrt {c} - B \sqrt {a} \sqrt {c}\right )} \log \left (-\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 1\right )}{a c^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )} - \frac {2 \, {\left (A \sqrt {a} \sqrt {c} - B \sqrt {a} \sqrt {c}\right )} \log \left ({\left | \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) \right |}\right )}{a c^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )} + \frac {A \sqrt {a} \sqrt {c} + B \sqrt {a} \sqrt {c}}{a c^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2}}}{4 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*sin(f*x+e))/(c-c*sin(f*x+e))^(3/2)/(a+a*sin(f*x+e))^(1/2),x, algorithm="giac")

[Out]

-1/4*((A*sqrt(a)*sqrt(c) - B*sqrt(a)*sqrt(c))*log(-sin(-1/4*pi + 1/2*f*x + 1/2*e)^2 + 1)/(a*c^2*sgn(cos(-1/4*p
i + 1/2*f*x + 1/2*e))*sgn(sin(-1/4*pi + 1/2*f*x + 1/2*e))) - 2*(A*sqrt(a)*sqrt(c) - B*sqrt(a)*sqrt(c))*log(abs
(sin(-1/4*pi + 1/2*f*x + 1/2*e)))/(a*c^2*sgn(cos(-1/4*pi + 1/2*f*x + 1/2*e))*sgn(sin(-1/4*pi + 1/2*f*x + 1/2*e
))) + (A*sqrt(a)*sqrt(c) + B*sqrt(a)*sqrt(c))/(a*c^2*sgn(cos(-1/4*pi + 1/2*f*x + 1/2*e))*sgn(sin(-1/4*pi + 1/2
*f*x + 1/2*e))*sin(-1/4*pi + 1/2*f*x + 1/2*e)^2))/f

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {A+B\,\sin \left (e+f\,x\right )}{\sqrt {a+a\,\sin \left (e+f\,x\right )}\,{\left (c-c\,\sin \left (e+f\,x\right )\right )}^{3/2}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*sin(e + f*x))/((a + a*sin(e + f*x))^(1/2)*(c - c*sin(e + f*x))^(3/2)),x)

[Out]

int((A + B*sin(e + f*x))/((a + a*sin(e + f*x))^(1/2)*(c - c*sin(e + f*x))^(3/2)), x)

________________________________________________________________________________________